package com.shuzijun.leetcode.editor.cn;
public class PowerOfTwo{
    public static void main(String[] args) {
         Solution solution = new PowerOfTwo().new Solution();
    }
    //leetcode submit region begin(Prohibit modification and deletion)
class Solution {
    public boolean isPowerOfTwo(int n) {
        while (n != 0){
            if ((n&1) ==1){
                if ((n >> 1) == 0) return true;
                else return false;
            }
            n >>= 1;
        }

        return false;
    }
}
//leetcode submit region end(Prohibit modification and deletion)

}